<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>每日任务</title>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Noto Sans SC', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            position: relative;
            overflow-x: hidden;
        }

        /* 动态背景粒子效果 */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: 
                radial-gradient(circle at 20% 80%, rgba(255, 182, 193, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(173, 216, 230, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(255, 218, 185, 0.2) 0%, transparent 50%);
            animation: float 20s ease-in-out infinite;
            z-index: -1;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            33% { transform: translateY(-20px) rotate(1deg); }
            66% { transform: translateY(10px) rotate(-1deg); }
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            position: relative;
            z-index: 1;
        }

        .header {
            text-align: center;
            margin-bottom: 30px;
            position: relative;
        }

        .title {
            font-size: 2.5rem;
            font-weight: 700;
            background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
            background-size: 300% 300%;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: gradientShift 3s ease-in-out infinite;
            text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
            margin-bottom: 10px;
        }

        @keyframes gradientShift {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        .subtitle {
            font-size: 1.1rem;
            color: rgba(255, 255, 255, 0.9);
            font-weight: 300;
        }

        .user-info {
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 20px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }

        .user-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }

        .stat-card {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 15px;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }

        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
        }

        .stat-icon {
            font-size: 2rem;
            margin-bottom: 8px;
            filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
        }

        .stat-label {
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.8);
            margin-bottom: 5px;
        }

        .stat-value {
            font-size: 1.3rem;
            font-weight: 600;
            color: #fff;
        }

        .quests-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .quest-card {
            background: rgba(255, 255, 255, 0.12);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 25px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
        }

        .quest-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            transition: left 0.5s;
        }

        .quest-card:hover::before {
            left: 100%;
        }

        .quest-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
            border-color: rgba(255, 255, 255, 0.4);
        }

        .quest-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }

        .quest-icon {
            font-size: 2.5rem;
            margin-right: 15px;
            filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
        }

        .quest-info h3 {
            font-size: 1.3rem;
            font-weight: 600;
            color: #fff;
            margin-bottom: 5px;
        }

        .quest-description {
            font-size: 0.95rem;
            color: rgba(255, 255, 255, 0.8);
            line-height: 1.4;
        }

        .quest-progress {
            margin: 20px 0;
        }

        .progress-bar {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 25px;
            height: 12px;
            overflow: hidden;
            position: relative;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
            border-radius: 25px;
            transition: width 0.8s ease;
            position: relative;
        }

        .progress-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .progress-text {
            text-align: center;
            margin-top: 8px;
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.9);
            font-weight: 500;
        }

        .quest-rewards {
            background: rgba(255, 255, 255, 0.08);
            border-radius: 15px;
            padding: 15px;
            margin-top: 15px;
        }

        .rewards-title {
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.8);
            margin-bottom: 10px;
            text-align: center;
        }

        .rewards-list {
            display: flex;
            justify-content: center;
            gap: 15px;
            flex-wrap: wrap;
        }

        .reward-item {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            padding: 8px 12px;
            font-size: 0.85rem;
            color: #fff;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .quest-status {
            position: absolute;
            top: 15px;
            right: 15px;
            font-size: 1.5rem;
            filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
        }

        .quest-status.completed {
            animation: bounce 1s infinite;
        }

        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-10px); }
            60% { transform: translateY(-5px); }
        }

        .tips {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 25px;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .tips h3 {
            color: #fff;
            margin-bottom: 15px;
            font-size: 1.2rem;
        }

        .tips-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 15px;
        }

        .tip-item {
            background: rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            padding: 12px;
            color: rgba(255, 255, 255, 0.9);
            font-size: 0.9rem;
            transition: all 0.3s ease;
        }

        .tip-item:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: translateY(-2px);
        }

        /* 可爱的装饰元素 */
        .decoration {
            position: absolute;
            pointer-events: none;
            opacity: 0.6;
        }

        .star {
            color: #ffd700;
            font-size: 1.2rem;
            animation: twinkle 2s infinite;
        }

        @keyframes twinkle {
            0%, 100% { opacity: 0.6; transform: scale(1); }
            50% { opacity: 1; transform: scale(1.2); }
        }

        .heart {
            color: #ff69b4;
            font-size: 1rem;
            animation: heartbeat 1.5s infinite;
        }

        @keyframes heartbeat {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .container {
                padding: 15px;
            }
            
            .title {
                font-size: 2rem;
            }
            
            .quests-grid {
                grid-template-columns: 1fr;
            }
            
            .user-stats {
                grid-template-columns: repeat(2, 1fr);
            }
        }
    </style>
</head>
<body>
    <!-- 装饰元素 -->
    <div class="decoration star" style="top: 10%; left: 5%;">✨</div>
    <div class="decoration heart" style="top: 20%; right: 8%;">💖</div>
    <div class="decoration star" style="bottom: 15%; left: 10%;">⭐</div>
    <div class="decoration heart" style="bottom: 25%; right: 15%;">💕</div>
    <div class="decoration star" style="top: 60%; left: 3%;">🌟</div>
    <div class="decoration heart" style="top: 70%; right: 5%;">💝</div>

    <div class="container">
        <div class="header">
            <h1 class="title">✨ 每日任务 ✨</h1>
            <p class="subtitle">今天也要加油完成任务哦~ (ﾉ◕ヮ◕)ﾉ*:･ﾟ✧</p>
        </div>

        <div class="user-info">
            <div style="text-align: center; margin-bottom: 15px;">
                <h2 style="color: #fff; font-size: 1.4rem; margin-bottom: 5px;">🌸 {{username}} 的任务面板 🌸</h2>
                <p style="color: rgba(255, 255, 255, 0.8); font-size: 0.95rem;">用户ID: {{userId}}</p>
            </div>
            
            <div class="user-stats">
                <div class="stat-card">
                    <div class="stat-icon">🎯</div>
                    <div class="stat-label">任务点数</div>
                    <div class="stat-value">{{questPoints}}</div>
                </div>
                <div class="stat-card">
                    <div class="stat-icon">📅</div>
                    <div class="stat-label">今日完成</div>
                    <div class="stat-value">{{dailyCompleted}}/{{dailyTotal}}</div>
                </div>
                <div class="stat-card">
                    <div class="stat-icon">🔥</div>
                    <div class="stat-label">连续天数</div>
                    <div class="stat-value">{{streakDays}}</div>
                </div>
                <div class="stat-card">
                    <div class="stat-icon">⏰</div>
                    <div class="stat-label">刷新倒计时</div>
                    <div class="stat-value">{{refreshTime}}</div>
                </div>
            </div>
        </div>

        <div class="quests-grid">
            {{each quests}}
            <div class="quest-card">
                <div class="quest-status {{status}}">{{statusIcon}}</div>
                
                <div class="quest-header">
                    <div class="quest-icon">{{icon}}</div>
                    <div class="quest-info">
                        <h3>{{name}}</h3>
                        <p class="quest-description">{{description}}</p>
                        {{if requirement}}
                        <p style="color: #ffd700; font-size: 0.85rem; margin-top: 5px;">⚠️ {{requirement}}</p>
                        {{/if}}
                    </div>
                </div>

                <div class="quest-progress">
                    <div class="progress-bar">
                        <div class="progress-fill" style="width: {{progressPercent}}%;"></div>
                    </div>
                    <div class="progress-text">{{progressText}} ({{progressPercent}}%)</div>
                </div>

                <div class="quest-rewards">
                    <div class="rewards-title">🎁 任务奖励</div>
                    <div class="rewards-list">
                        {{if rewards.money}}
                        <div class="reward-item">💰 {{rewards.money}}金币</div>
                        {{/if}}
                        {{if rewards.quest_points}}
                        <div class="reward-item">🎯 {{rewards.quest_points}}任务点</div>
                        {{/if}}
                        {{if rewards.love}}
                        <div class="reward-item">💕 {{rewards.love}}爱心</div>
                        {{/if}}
                        {{each rewards.items}}
                        <div class="reward-item">🎁 {{$value}}x道具</div>
                        {{/each}}
                    </div>
                </div>
            </div>
            {{/each}}
        </div>

        <div class="tips">
            <h3>💡 温馨提示</h3>
            <div class="tips-grid">
                <div class="tip-item">
                    <span>🌟</span>
                    <span>每日0点自动刷新任务</span>
                </div>
                <div class="tip-item">
                    <span>🎁</span>
                    <span>完成任务后记得领取奖励哦</span>
                </div>
                <div class="tip-item">
                    <span>💎</span>
                    <span>任务点数可以在商店兑换道具</span>
                </div>
                <div class="tip-item">
                    <span>🔥</span>
                    <span>连续完成任务有额外奖励</span>
                </div>
            </div>
        </div>
    </div>
</body>
</html>